#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include<QStringList>
#include<the_video_clip.h>
#include<qthread.h>
#include<QTime>
#include<mythread.h>
#include<QDesktopServices>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    //开始前获取信息
    void getinfo_befroestart();
    //文本转字幕function
    QString textTOsubtitle(QString text,QTime time);//固定字幕
    QString textTOsubtilte_fuhao(QString text,QTime time);//以符号短句
    bool DeleteFileOrFolder(QString filename);

private slots:
    void on_pushButton_start_clicked();

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void on_checkBox_textTOzimu_stateChanged(int arg1);

    void on_checkBox_cut_startend_stateChanged(int arg1);
    //接收信号
    void slot_getinfo(QString str,QString pro);
    void on_pushButton_4_clicked();

    void on_checkBox_onlycut_beginend_stateChanged(int arg1);

    void on_checkBox_setlogo_stateChanged(int arg1);

    void on_checkBox_setvideo_stateChanged(int arg1);

    void on_pushButton_5_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_6_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

    void on_checkBox_pictruecut_stateChanged(int arg1);

    void on_pushButton_jiaohuantext_clicked();

signals:
    void signal_start(QStringList videofilelist, QString outpath,QTime cuttime, QTime onevideotime, QStringList audiolist, QString zimufile, QString titie,QString logo, bool addaudio, bool addzimu);
private:
    Ui::MainWindow *ui;
    //文件
    QStringList filelist,audio_filelist;
    QString subtitles;

    //标识
    bool textTOzimu=0,cut_startend=0,onlycut_beginend=0,setlogo=0,setvideo=0,piccut=0;
    //时间
    QTime timezimu,timecutstart,timecutend,timefenduan,timelastvideo;
    //字幕文本
    QString zimustr;
    //设置
    QString title,logo;
    QString outfilepath;




};
#endif // MAINWINDOW_H
